package com.bookmarket.service;

import com.bookmarket.entity.Discount;
import com.github.pagehelper.Page;

import java.util.List;
import java.util.Map;

/**
 * @author Chen Zhaoguang
 * @date 2018/1/2 9:20
 */
public interface CzgIDiscountService {

    /**
     * 优惠券分页查询
     * @param cond
     * @return
     */
    Page queryLikeDiscounts(Map<String, Object> cond);

    /**
     * 添加
     * @param map
     * @return
     */
    int addDiscount(Map<String,Object> map);

    /**
     * 删除优惠券
     * @param discount
     * @return
     */
    int delDiscount(Discount discount);

    /**
     * 获取单个优惠券
     * @param id
     * @return
     */
    Discount getDiscount(int id);

    /**
     *编辑优惠券
     * @param map
     */
    void  editDiscount(Map<String,Object> map);
}
